﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AnQinFrameWorkAPI.Common.Enum;

namespace AnQinFrameWorkAPI.Entity.Blog.Entity;

/// <summary>
///     博客文章模型
/// </summary>
[Table("BlogText")]
public class BlogTextModel
{
    /// <summary>
    ///     博客文章id
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     博客用户id
    /// </summary>
    [MaxLength(36)]
    public Guid UserId { get; set; }

    /// <summary>
    ///     博客文章编码
    /// </summary>
    [MaxLength(36)]
    public string Code { get; set; }

    /// <summary>
    ///     博客文章标题
    /// </summary>
    [MaxLength(36)]
    public string Name { get; set; }

    /// <summary>
    ///     博客文章内容
    /// </summary>
    [Column(TypeName = "nvarchar(max)")]
    public string Content { get; set; }

    /// <summary>
    ///     博客文章阅读量
    /// </summary>
    public int ReadCount { get; set; }

    /// <summary>
    ///     审核状态
    /// </summary>
    public BlogEnum.ExamStatusEnum Status { get; set; }

    /// <summary>
    ///     创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }
}